package com.dating.view;

import java.util.ArrayList;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.dating.entities.Her;

public class SuggestAdapter extends BaseAdapter {
	private Context mContext;
	
	ArrayList<Her> list_her;
	
	// Constructor
	public SuggestAdapter(Context c,ArrayList<Her> listHer){
		mContext = c;
		this.list_her=listHer;
	}

	@Override
	public int getCount() {
		return list_her.size();
	}

	@Override
	public Object getItem(int position) {
		return list_her.get(position);
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {			
		DtSuggestHer v=(DtSuggestHer)convertView;
		if(v==null){
			Her h=list_her.get(position);
			v=new DtSuggestHer(mContext, h.isOnline(), h._nickname, h._bmp);
		}
		return v;
	}

}
